<script setup lang="ts">import { ref } from 'vue';
const {modelValue}= defineProps<{
  modelValue:boolean
}>()
const emit= defineEmits<{
  (event: 'update:modelValue', val: boolean): void
}>()
const hClick=()=>{
  emit('update:modelValue',!modelValue)
}
</script>
<template>
  <div class="box">
    <i @click="hClick" class="iconfont icon-checked" v-if="modelValue"></i>
    <!-- 未选中时，要显示的图标 -->
    <i @click="hClick" class="iconfont icon-unchecked" v-else></i>
  </div>
</template>

<style lang="less" scoped></style>
